package com.zz.service;

import org.example.dto.StudentInfoDTO;
import com.zz.service.StudentCacheService;
import org.springframework.stereotype.Service;

@Service
public class AnotherService {

    private final StudentCacheService studentCacheService;

    public AnotherService(StudentCacheService studentCacheService) {
        this.studentCacheService = studentCacheService;
    }

    public void doSomethingWithStudent(String machineId) {
//        // 从缓存获取学生信息
//        StudentInfoDTO student = studentCacheService.getStudentFromCache(machineId);
//        if (student != null) {
//            System.out.println("从缓存获取学生: " + student.getName());
//            // 处理业务逻辑...
//        } else {
//            System.out.println("缓存中没有找到学生ID: " + machineId);
//        }
    }
}